#define _CRT_SECURE_NO_WARNINGS 1

#include"Dlist.h"
void test1()
{
	ListNode* Dlist;
	Dlist = ListCreate();
	ListPrint(Dlist);
	ListPushBack(Dlist, 1);
	ListPushBack(Dlist, 2);
	ListPushBack(Dlist, 3);
	ListPushBack(Dlist, 4);
	ListPushBack(Dlist, 5);
	ListPrint(Dlist);

	ListPushFront(Dlist, 6);
	ListPushFront(Dlist, 7);
	ListPushFront(Dlist, 8);
	ListPushFront(Dlist, 9);
	ListPushFront(Dlist, 10);
	ListPrint(Dlist);

	ListPopBack(Dlist);
	ListPopBack(Dlist);
	ListPopBack(Dlist);
	ListPrint(Dlist);
	ListPopFront(Dlist);
	ListPopFront(Dlist);
	ListPopFront(Dlist);
	ListPopFront(Dlist);
	ListPopFront(Dlist);

	ListPrint(Dlist);

}

void test2()
{
	ListNode* Dlist;
	Dlist = ListCreate();
	ListPrint(Dlist);
	ListPushBack(Dlist, 1);
	ListPushBack(Dlist, 2);
	ListPushBack(Dlist, 3);
	ListPushBack(Dlist, 4);
	ListPushBack(Dlist, 5);
	ListPrint(Dlist);

	ListPushFront(Dlist, 6);
	ListPushFront(Dlist, 7);
	ListPushFront(Dlist, 8);
	ListPushFront(Dlist, 9);
	ListPushFront(Dlist, 10);
	ListPrint(Dlist);
	ListNode* ret = ListFind(Dlist, 4);
	//ListModif(Dlist,4,40);
	//ListInsert(ret, 40);
	ListErase(ret);
	ListPrint(Dlist);
	//printf("%d\n", ret->data);
}
int main()
{
	

	test1();

	//test2();





	return 0;
}